<!--
 * @Descripttion:
 * @version:
 * @Author: cxguo
 * @Date: 2019-10-30 21:29:17
 * @LastEditors: cxguo
 * @LastEditTime: 2020-06-10 19:30:55
 -->
<template>
  <div>
    <el-tabs>
      <el-tab-pane label="价格信息">
        <Price ref="price" v-bind="$attrs" />
      </el-tab-pane>
      <el-tab-pane label="条形码">
        <Barcode ref="barcode" v-bind="$attrs" />
      </el-tab-pane>
      <el-tab-pane label="期初库存">
        <Stock ref="stock" v-bind="$attrs" />
      </el-tab-pane>
      <el-tab-pane label="库存预警">
        <StockWarn ref="stockWarn" v-bind="$attrs" />
      </el-tab-pane>
    </el-tabs>
    <!-- <div class="text-center margin-t20">
      <el-button class="wfull" size="medium" type="primary" @click="$parent.$parent.btnDrawerSure">确 定</el-button>
    </div> -->
  </div>
</template>
<script>
import { oftenuse } from '@/libs/mixins'
import { Price, Barcode, Stock, StockWarn } from './components'
import clonedeep from 'clonedeep'

export default {
  name: 'SkuMore',
  components: { Price, Barcode, Stock, StockWarn },
  mixins: [oftenuse],
  props: {
  },
  data() {
    return {
    }
  },
  computed: {
  },
  watch: {
  },
  created() {
  },
  methods: {
    btnSure() {
    },
    initData() {
      this.$refs.price.initData()
      this.$refs.barcode.initData()
      this.$refs.stock.initData()
      this.$refs.stockWarn.initData()
    },
    getData() {
      const priceData = this.$refs.price.getPriceData()
      const barcodeData = this.$refs.barcode.getBarcodeData()
      const stockData = this.$refs.stock.getStockData()
      const stockWarnData = this.$refs.stockWarn.getStockWarnData()
      return clonedeep({ priceData, barcodeData, stockData, stockWarnData })
    }
  }
}
</script>
<style lang="scss" scoped>
.wrapper{
  padding:0 20px;
}
</style>

